package com.zj.demo1.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Value("${com.zj.phone}")
    private String phone;

    @Value("${com.zj.mood}")
    private String mood;

    @GetMapping("/test1")
    public String test1() {
        return "my phone is "+phone+",and now my mood is "+mood;
    }


    @GetMapping("/test")
    public String test() {
        return "hello world!";
    }
}
